Open Bug 1719314 Opened 4 years ago Updated 1 month ago

Consider changing nscoord (app units) to be something exactly representable as a float

Categories

(Core :: Layout, defect)

defect

Tracking

()

People

(Reporter: emilio, Unassigned)

References

(Blocks 2 open bugs)

Details

(Keywords: webcompat:platform-bug)

Attachments

(1 file)

Chrome uses 1/64 of a CSS pixel, which does the trick. This is the only reasonable way I can think to prevent issues like bug 1717890, where slack gets confused due to floating point inaccuracies from the app units -> fp -> app units conversions.

This is probably a pretty big chunk of work that said... There are some WIP patches in bug 1640441 IIRC, and probably some others.

Not sure if this is worth doing, or tackling directly, but since bug 1640441 keeps coming back we might have to consider doing something like it...

What are the pros and cons of our 1/60 representation vs Chrome's 1/64?

Pros of 1/60 are described in bug 177805 (basically, it allows to represent thirds / fifths exactly). Pros of 1/64 are that math on them is faster (e.g., halving is just a bit shift) and that they're exactly representable as floats.

Setting S3 for now (though I am a supporter of this change).

Severity: -- → S3
See Also: → 265084
Summary: Consider changing app units to be something exactly representable as a float → Consider changing nscoord (app units) to be something exactly representable as a float
See Also: → 1914970

Not fully green yet, but it doesn't look too terrible.

See Also: → 1925872
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: